home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / AMOS / AMOSList-0697 / AMOSLIST / text0251.txt < prev    next >
Encoding:
Text File  |  1997-07-03  |  1.2 KB  |  44 lines

  1.  
  2. Here is another problem maybe someone can help me with?
  3.  
  4. On a non-scrolling, 32 color, 320 x 200 NTSC screen, I have changed
  5. the mouse pointer into a pencil shape image I made, using the code below:
  6.     
  7.            Hide  
  8.           Sprite 0,X Hard(361),Y Hard(100),35 : rem 35 is the image # for
  9. the pencil shape
  10.           Channel 0 to Sprite 0
  11.            Amal 0,"M:Let X=XM;Let Y=YM;Jump M;"
  12.            Amal On 0
  13.  
  14. How do I detect a collision between the mouse pointer (sprite 0) and a bob,
  15. For example, Bob 5 ?
  16.  
  17. I have tried the following:
  18.     
  19.          C=Spritebob Col(0,5 To 5)
  20.           If C=-1
  21.                 End
  22.           End If
  23.  
  24. It does'nt work!! Why?
  25. I have even tried: Bobsprite Col...
  26.                              Bob Col...
  27.                              Sprite Col...
  28. Nothing works when I want a collision between sprite 0 and a bob!!!!
  29.  
  30. If I change the sprite into a bob like this, it works:
  31.                 Bob 0,X Hard(360),Y Hard(100),35
  32.                  Channel 0 To Bob 0
  33.                   Amal 0,"M:Let X=XM'Let Y=YM;Jump M;"
  34.                   AmalOn 0
  35.  
  36. This works fine for 'C=Bob col (0,5 to 5)
  37.  
  38. But how do you detect a collision between a sprite and a bob??
  39.  
  40. Robert W. Benjamin
  41. rwbenjamin@sosbbs.com
  42.  
  43.  
  44.